package com.wlcj.www.enumtype;

public enum PlatformBackgroundEnum {
	
	YHX(1, "银行系"),
	MYX(2, "民营系"),
	SSGSX(3, "上市公司系"),
	GZX(4, "国资系"),
	QT(5, "");
	private int code;
	private String desc;
	private PlatformBackgroundEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public static PlatformBackgroundEnum getEnumByCode(int code) {
		for(PlatformBackgroundEnum enumtype:values()) {
			if(code==enumtype.getCode())
				return enumtype;
		}
		return null;
	}
	
	public static PlatformBackgroundEnum getEnumByDesc(String desc) {
		for(PlatformBackgroundEnum enumtype:values()) {
			if(desc.equals(enumtype.getDesc()))
				return enumtype;
		}
		return null;
	}

}
